package com.weixing.mall.provider.api.service;

import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.provider.api.erp.entity.InDepot;
import com.weixing.mall.provider.api.erp.entity.OutDepot;
import com.weixing.mall.provider.api.erp.vo.ResultSkuInfoVo;
import com.weixing.mall.provider.api.fallback.ErpFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.ribbon.FeignRibbonClientAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/10/9 15:49
 * @Modified By:
 */
@FeignClient(value = "mall-provider-goods", configuration = FeignRibbonClientAutoConfiguration.class, fallback = ErpFeignFallback.class)
public interface ErpFeign {

    @GetMapping("/api/erp/selectDepotSkuStockByPage")
    Result<ResultSkuInfoVo> selectDepotSkuStockByPage(@RequestParam(value = "depotid") String depotid,
                                                  @RequestParam(value = "styleid") String styleid,
                                                  @RequestParam(value = "sku") String sku);
    @PostMapping("/api/erp/addOutDepot")
    Result addOutDepot(@RequestBody OutDepot outDepot);

    @PostMapping("/api/erp/addInDepot")
    Result addInDepot(@RequestBody InDepot inDepot);
}
